package dbTools.XML;

import java.io.File;

import org.dom4j.Document;
import org.dom4j.io.SAXReader;


public class CommonXMLReader {
	public static Document load(String filename,String rootPath){ 
		rootPath=rootPath.endsWith("/")?rootPath:rootPath+"/";
		 Document document = null; 
		 try{  
		  SAXReader saxReader = new SAXReader(); 
		  document = saxReader.read(new File(rootPath+filename)); 
		 } 
		 catch (Exception ex){ 
		  // ex.printStackTrace(); 
		 }   
		 return document; 
		}
}
